package com.smile.service.entity.device.property;

import com.alibaba.fastjson2.annotation.JSONField;
import lombok.ToString;

@ToString
public class DockEnvironmentStatus {

    /**
     * 网络状态
     */
    @JSONField(name = "network_state")
    private NetworkState networkState;

    /**
     * 飞行器充电状态
     */
    @JSONField(name = "drone_charge_state")
    private DroneChargeState droneChargeState;

    /**
     * 飞行器是否在舱
     */
    @JSONField(name = "drone_in_dock")
    private int droneInDock;

    /**
     * 降雨量
     */
    @JSONField(name = "rainfall")
    private int rainfall;

    /**
     * 风速
     */
    @JSONField(name = "wind_speed")
    private int windSpeed;

    /**
     * 环境温度
     */
    @JSONField(name = "environment_temperature")
    private int environmentTemperature;

    /**
     * 舱内温度
     */
    @JSONField(name = "temperature")
    private double temperature;

    /**
     * 舱内湿度
     */
    @JSONField(name = "humidity")
    private int humidity;

    /**
     * 纬度
     */
    @JSONField(name = "latitude")
    private double latitude;

    /**
     * 经度
     */
    @JSONField(name = "longitude")
    private double longitude;

    /**
     * 椭球高度
     */
    @JSONField(name = "height")
    private double height;

    /**
     * 备降点
     */
    @JSONField(name = "alternate_land_point")
    private AlternateLandPoint alternateLandPoint;

    /**
     * 首次上电时间
     */
    @JSONField(name = "first_power_on")
    private long firstPowerOn;

    /**
     * 搜星状态
     */
    @JSONField(name = "position_state")
    private PositionState positionState;

    /**
     * 存储容量
     */
    @JSONField(name = "storage")
    private StorageStatus storage;

    /**
     * 机场状态
     */
    @JSONField(name = "mode_code")
    private int modeCode;

    /**
     * 舱盖状态
     */
    @JSONField(name = "cover_state")
    private int coverState;

    /**
     * 补光灯状态
     */
    @JSONField(name = "supplement_light_state")
    private int supplementLightState;

    /**
     * 紧急停止按钮状态
     */
    @JSONField(name = "emergency_stop_state")
    private int emergencyStopState;

    /**
     * 机场空调模式
     */
    @JSONField(name = "air_conditioner_mode")
    private int airConditionerMode;

    /**
     * 电池运行模式
     */
    @JSONField(name = "battery_store_mode")
    private int batteryStoreMode;

    /**
     * 机场声光报警状态
     */
    @JSONField(name = "alarm_state")
    private int alarmState;

    /**
     * 推杆状态
     */
    @JSONField(name = "putter_state")
    private int putterState;

    /**
     * 子设备状态
     */
    @JSONField(name = "sub_device")
    private SubDeviceInfo subDevice;

    // 嵌套类定义
    @ToString
    public static class NetworkState {
        @JSONField(name = "type")
        private int type;

        @JSONField(name = "quality")
        private int quality;

        @JSONField(name = "rate")
        private double rate;

        // Getters/Setters
        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public int getQuality() {
            return quality;
        }

        public void setQuality(int quality) {
            this.quality = quality;
        }

        public double getRate() {
            return rate;
        }

        public void setRate(double rate) {
            this.rate = rate;
        }
    }

    @ToString
    public static class DroneChargeState {
        @JSONField(name = "state")
        private int state;

        @JSONField(name = "capacity_percent")
        private int capacityPercent;

        public int getState() {
            return state;
        }

        public void setState(int state) {
            this.state = state;
        }

        public int getCapacityPercent() {
            return capacityPercent;
        }

        public void setCapacityPercent(int capacityPercent) {
            this.capacityPercent = capacityPercent;
        }
    }

    @ToString
    public static class AlternateLandPoint {
        @JSONField(name = "latitude")
        private double latitude;

        @JSONField(name = "longitude")
        private double longitude;

        @JSONField(name = "safe_land_height")
        private int safeLandHeight;

        @JSONField(name = "is_configured")
        private int isConfigured;

        public double getLatitude() {
            return latitude;
        }

        public void setLatitude(double latitude) {
            this.latitude = latitude;
        }

        public double getLongitude() {
            return longitude;
        }

        public void setLongitude(double longitude) {
            this.longitude = longitude;
        }

        public int getSafeLandHeight() {
            return safeLandHeight;
        }

        public void setSafeLandHeight(int safeLandHeight) {
            this.safeLandHeight = safeLandHeight;
        }

        public int getIsConfigured() {
            return isConfigured;
        }

        public void setIsConfigured(int isConfigured) {
            this.isConfigured = isConfigured;
        }
    }

    @ToString
    public static class PositionState {
        @JSONField(name = "is_calibration")
        private int isCalibration;

        @JSONField(name = "is_fixed")
        private int isFixed;

        @JSONField(name = "quality")
        private int quality;

        @JSONField(name = "gps_number")
        private int gpsNumber;

        @JSONField(name = "rtk_number")
        private int rtkNumber;

        public int getIsCalibration() {
            return isCalibration;
        }

        public void setIsCalibration(int isCalibration) {
            this.isCalibration = isCalibration;
        }

        public int getIsFixed() {
            return isFixed;
        }

        public void setIsFixed(int isFixed) {
            this.isFixed = isFixed;
        }

        public int getQuality() {
            return quality;
        }

        public void setQuality(int quality) {
            this.quality = quality;
        }

        public int getGpsNumber() {
            return gpsNumber;
        }

        public void setGpsNumber(int gpsNumber) {
            this.gpsNumber = gpsNumber;
        }

        public int getRtkNumber() {
            return rtkNumber;
        }

        public void setRtkNumber(int rtkNumber) {
            this.rtkNumber = rtkNumber;
        }
    }

    @ToString
    public static class StorageStatus {
        @JSONField(name = "total")
        private long total;

        @JSONField(name = "used")
        private long used;

        public long getTotal() {
            return total;
        }

        public void setTotal(long total) {
            this.total = total;
        }

        public long getUsed() {
            return used;
        }

        public void setUsed(long used) {
            this.used = used;
        }
    }

    @ToString
    public static class SubDeviceInfo {
        @JSONField(name = "device_sn")
        private String deviceSn;

        @JSONField(name = "device_model_key")
        private String deviceModelKey;

        @JSONField(name = "device_online_status")
        private int deviceOnlineStatus;

        @JSONField(name = "device_paired")
        private int devicePaired;

        public String getDeviceSn() {
            return deviceSn;
        }

        public void setDeviceSn(String deviceSn) {
            this.deviceSn = deviceSn;
        }

        public String getDeviceModelKey() {
            return deviceModelKey;
        }

        public void setDeviceModelKey(String deviceModelKey) {
            this.deviceModelKey = deviceModelKey;
        }

        public int getDeviceOnlineStatus() {
            return deviceOnlineStatus;
        }

        public void setDeviceOnlineStatus(int deviceOnlineStatus) {
            this.deviceOnlineStatus = deviceOnlineStatus;
        }

        public int getDevicePaired() {
            return devicePaired;
        }

        public void setDevicePaired(int devicePaired) {
            this.devicePaired = devicePaired;
        }
    }

    // Getters/Setters
    public NetworkState getNetworkState() {
        return networkState;
    }

    public void setNetworkState(NetworkState networkState) {
        this.networkState = networkState;
    }

    public DroneChargeState getDroneChargeState() {
        return droneChargeState;
    }

    public void setDroneChargeState(DroneChargeState droneChargeState) {
        this.droneChargeState = droneChargeState;
    }

    public int getDroneInDock() {
        return droneInDock;
    }

    public void setDroneInDock(int droneInDock) {
        this.droneInDock = droneInDock;
    }

    public int getRainfall() {
        return rainfall;
    }

    public void setRainfall(int rainfall) {
        this.rainfall = rainfall;
    }

    public int getWindSpeed() {
        return windSpeed;
    }

    public void setWindSpeed(int windSpeed) {
        this.windSpeed = windSpeed;
    }

    public int getEnvironmentTemperature() {
        return environmentTemperature;
    }

    public void setEnvironmentTemperature(int environmentTemperature) {
        this.environmentTemperature = environmentTemperature;
    }

    public double getTemperature() {
        return temperature;
    }

    public void setTemperature(double temperature) {
        this.temperature = temperature;
    }

    public int getHumidity() {
        return humidity;
    }

    public void setHumidity(int humidity) {
        this.humidity = humidity;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public AlternateLandPoint getAlternateLandPoint() {
        return alternateLandPoint;
    }

    public void setAlternateLandPoint(AlternateLandPoint alternateLandPoint) {
        this.alternateLandPoint = alternateLandPoint;
    }

    public long getFirstPowerOn() {
        return firstPowerOn;
    }

    public void setFirstPowerOn(long firstPowerOn) {
        this.firstPowerOn = firstPowerOn;
    }

    public PositionState getPositionState() {
        return positionState;
    }

    public void setPositionState(PositionState positionState) {
        this.positionState = positionState;
    }

    public StorageStatus getStorage() {
        return storage;
    }

    public void setStorage(StorageStatus storage) {
        this.storage = storage;
    }

    public int getModeCode() {
        return modeCode;
    }

    public void setModeCode(int modeCode) {
        this.modeCode = modeCode;
    }

    public int getCoverState() {
        return coverState;
    }

    public void setCoverState(int coverState) {
        this.coverState = coverState;
    }

    public int getSupplementLightState() {
        return supplementLightState;
    }

    public void setSupplementLightState(int supplementLightState) {
        this.supplementLightState = supplementLightState;
    }

    public int getEmergencyStopState() {
        return emergencyStopState;
    }

    public void setEmergencyStopState(int emergencyStopState) {
        this.emergencyStopState = emergencyStopState;
    }

    public int getAirConditionerMode() {
        return airConditionerMode;
    }

    public void setAirConditionerMode(int airConditionerMode) {
        this.airConditionerMode = airConditionerMode;
    }

    public int getBatteryStoreMode() {
        return batteryStoreMode;
    }

    public void setBatteryStoreMode(int batteryStoreMode) {
        this.batteryStoreMode = batteryStoreMode;
    }

    public int getAlarmState() {
        return alarmState;
    }

    public void setAlarmState(int alarmState) {
        this.alarmState = alarmState;
    }

    public int getPutterState() {
        return putterState;
    }

    public void setPutterState(int putterState) {
        this.putterState = putterState;
    }

    public SubDeviceInfo getSubDevice() {
        return subDevice;
    }

    public void setSubDevice(SubDeviceInfo subDevice) {
        this.subDevice = subDevice;
    }
}